#ifndef TC_FORALL_HPP
#define TC_FORALL_HPP

/** \file ForAll.hpp
 * Declaration for the template function ForAll()
 *
 * (c) Copyright  Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id: ForAll.hpp 119 2006-06-21 04:57:25Z semihc $
 *
 *
 */

#include <algorithm>
#include "Global.hh"

namespace TC {

  /**
   * Wrap standard algorithm for_each to apply a 
   * function object to all entries.
   * C is the type of the container.
   * F is the type of the function object.
   */
  template <typename C, typename F>
  inline F ForAll(C& c, F& f)
  {
    return std::for_each(c.begin(), c.end(), f);
  }


} // end namespace


#endif /* Include guard */
